export default {
  height: 'auto',
  calcHeight: 30,
  tip: false,
  searchShow: true,
  searchMenuSpan: 6,
  border: true,
  index: true,
  viewBtn: true,
  selection: true,
  dialogClickModal: false,
  align: 'center',
  indexWidth: 80,
  indexLabel: '编号',
  menu: false,
  addBtn: false,
  labelWidth: 145,
  column: [
    {
      label: "主键",
      prop: "id",
      type: "input",
      addDisplay: false,
      editDisplay: false,
      viewDisplay: false,
      hide: true,
      display: false,
    },
    {
      label: "租户ID",
      prop: "tenantId",
      type: "input",
      addDisplay: false,
      editDisplay: false,
      viewDisplay: false,
      hide: true,
      display: false,
    },
    {
      label: "创建部门",
      prop: "createDept",
      type: "input",
      addDisplay: false,
      editDisplay: false,
      viewDisplay: false,
      hide: true,
      display: false,
    },
    {
      label: "修改人",
      prop: "updateUser",
      type: "input",
      addDisplay: false,
      editDisplay: false,
      viewDisplay: false,
      hide: true,
      display: false,
    },
    {
      label: "修改时间",
      prop: "updateTime",
      type: "input",
      addDisplay: false,
      editDisplay: false,
      viewDisplay: false,
      hide: true,
      display: false,
    },
    {
      label: "是否已删除",
      prop: "isDeleted",
      type: "input",
      addDisplay: false,
      editDisplay: false,
      viewDisplay: false,
      hide: true,
      display: false,
    },
    {
      label: "申办人",
      prop: "createUser",
      type: 'select',
      dicUrl: `/blade-system/user/user-list`,
      props: {
        label: 'realName',
        value: 'id',
      },
      addDisabled: true,
      editDisabled: true,
      filterable: true,
      overHidden: true,
      hide: true,
      disabled: true,
      rules: [{
        required: true,
        message: "请输入申办人",
        trigger: "blur"
      }],
    },
    {
      label: "业务名称",
      prop: "name",
      type: "input",
      width: 500,
      slot: true,
      rules: [{
        required: true,
        message: "请输入业务名称",
        trigger: "blur"
      }],
    },
    {
      label: "业务类型",
      prop: "type",
      type: 'select',
      dicUrl: '/api/blade-system/dict-biz/dictionary?code=trial_type',
      props: {
        label: 'dictValue',
        value: 'dictKey',
      },
      filterable: true,
      overHidden: true,
      hide: true,
    },
    {
      label: "疾病种类",
      prop: "illness",
      type: "tree",
      dicUrl: '/api/blade-illness/illness/tree',
      props: {
        label: 'title',
        value: 'id',
      },
      hide: true,
    },
    {
      label: "业务目的与预期结果",
      prop: "purposeExpectation",
      type: "input",
      hide: true,
    },
    {
      label: "流程模式",
      prop: "flowPattern",
      type: 'select',
      dicData: [{
        label: '（不固定）诊疗模式',
        value: '1'
      }, {
        label: '（固定）研究模式',
        value: '2'
      }],
      hide: true,
    },
    {
      label: "中心伦理机构",
      prop: "zxlljg",
      type: "input",
      hide: true,
    },
    {
      label: "业务状态",
      prop: "status",
      type: "select",
      dicUrl: '/api/blade-system/dict-biz/dictionary?code=trial_status',
      props: {
        label: 'dictValue',
        value: 'dictKey',
      },
      dataType: "number",
      addDisplay: false,
      editDisplay: false,
      viewDisplay: false,
    },
    {
      label: "业务负责人",
      prop: "personInCharge",
      type: 'select',
      dicUrl: `/blade-system/user/user-list`,
      props: {
        label: 'realName',
        value: 'id',
      },
      filterable: true,
      overHidden: true,
      rules: [{
        required: true,
        message: "请选择负责人",
        trigger: "blur"
      }],
    },
    {
      label: "入组采集",
      prop: "RZCJ",
      type: "input",
      slot: true,
      addDisplay: false,
      editDisplay: false,
      viewDisplay: false,
      display: false,
    },
    {
      label: "业务方式",
      prop: "mode",
      type: 'select',
      dicUrl: '/api/blade-system/dict-biz/dictionary?code=scale_mode_type',
      props: {
        label: 'dictValue',
        value: 'dictKey',
      },
      // dicData: [{
      //   label: '单中心研究',
      //   value: '1'
      // }, {
      //   label: '多中心研究',
      //   value: '2'
      // }],
      filterable: true,
      overHidden: true,
    },
    {
      label: "业务创建时间",
      prop: "createTime",
      type: "input",
      addDisplay: false,
      editDisplay: false,
      viewDisplay: false,
      hide: true,
    },
    {
      label: "进度统计",
      prop: "JDTJ",
      type: "input",
      slot: true,
      addDisplay: false,
      editDisplay: false,
      viewDisplay: false,
      display: false,
    },
    {
      label: "研究者(录入员)",
      prop: "researcher",
      type: 'select',
      dicUrl: `/blade-system/user/user-list`,
      props: {
        label: 'realName',
        value: 'id',
      },
      multiple: true,
      filterable: true,
      overHidden: true,
      hide: true,
      rules: [{
        required: true,
        message: "请选择研究者(录入员)",
        trigger: "blur"
      }],
      control: (val, form) => {
        // console.log(val,form);
      }
    },
    {
      label: "稽查员",
      prop: "inspector",
      type: 'select',
      dicUrl: `/blade-system/user/user-list`,
      props: {
        label: 'realName',
        value: 'id',
      },
      multiple: true,
      filterable: true,
      overHidden: true,
      hide: true,
    },
    {
      label: "监察员",
      prop: "supervisor",
      type: 'select',
      dicUrl: `/blade-system/user/user-list`,
      props: {
        label: 'realName',
        value: 'id',
      },
      multiple: true,
      filterable: true,
      overHidden: true,
      hide: true,
    },
    {
      label: "第三方监察员",
      prop: "dsfSupervisor",
      type: 'select',
      dicUrl: `/blade-system/user/user-list`,
      props: {
        label: 'realName',
        value: 'id',
      },
      multiple: true,
      filterable: true,
      overHidden: true,
      hide: true,
    },
    {
      label: "第三方稽查员",
      prop: "dsfInspector",
      type: 'select',
      dicUrl: `/blade-system/user/user-list`,
      props: {
        label: 'realName',
        value: 'id',
      },
      multiple: true,
      filterable: true,
      overHidden: true,
      hide: true,
    },
    {
      label: "研究机构",
      prop: "researchInstitution",
      type: "tree",
      dicUrl: '/api/blade-system/dept/tree',
      props: {
        label: 'title',
        value: 'id',
      },
      filterable: true,
      overHidden: true,
      hide: true,
    },
    {
      label: "方案所动  1锁定",
      prop: "lockStatus",
      type: "input",
      addDisplay: false,
      editDisplay: false,
      viewDisplay: false,
      hide: true,
      display: false,
    },

    {
      label: '相关资料',
      prop: 'informationList',
      type: 'dynamic',
      span: 24,
      hide: true,
      children: {
        index: false,
        align: 'center',
        type: 'form',
        headerAlign: 'center',
        rowAdd: (done) => {
          // ElMessage.success('新增回调'); // 使用 ElMessage
          done({ input: '默认值' });
        },
        rowDel: (row, done) => {
          // ElMessage.success('删除回调' + JSON.stringify(row)); // 使用 ElMessage
          done();
        },
        column: [
          {
            label: "资料类型",
            prop: "type",
            type: 'select',
            dicUrl: '/api/blade-system/dict-biz/dictionary?code=information_type',
            props: {
              label: 'dictValue',
              value: 'dictKey',
            },
            filterable: true,
            overHidden: true,
          },
          {
            label: "上传文件",
            prop: "link",
            type: 'upload',
            // slot: true,
            dataType: 'string',
            limit: 1,
            fileType: 'doc,docx,xls,xlsx,pdf,txt',
            action: '/blade-resource/oss/endpoint/put-file',
            propsHttp: {
              res: 'data',
              url: 'link',
            },
            // tip: '只能上传doc/docx/excel文件',
          },
        ]
      }
    }
  ]
}
